import os

import flask
from flask_sqlalchemy import SQLAlchemy

app = flask.Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = (
    "mysql+pymysql://"
    f"""{os.getenv("MYSQL_USERNAME")}:{os.getenv("MYSQL_PASSWORD")}"""
    f"""@{os.getenv("MYSQL_HOST")}/{os.getenv("MYSQL_DATABASE")}"""
)
db = SQLAlchemy(app)
